<template>
  <div class="block text-center" m="t-4">
    <el-carousel class="elwidth" trigger="click" height="400px">
      <el-carousel-item v-for="item in 4" :key="item">
        <h3 class="small justify-center" text="2xl">{{ item }}</h3>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>
<script setup>
    import {postIndexCarousel} from '../../utils/api'
    import {reactive} from 'vue'
    const lun=reactive([]);
    async function search(){
      let {data} =  await postIndexCarousel();
      lun.data.length=0;
      lun.data.push(...data.data);
    }
</script>


<style scoped>
.demonstration {
  color: var(--el-text-color-secondary);
}
.elwidth{
  width: 1200px;
 border: 1px solid red;
        margin: 0 auto;
}

.el-carousel__item h3 {
  color: #475669;
  opacity: 0.75;
  line-height: 150px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-image:url("../../../static/img/pic1.jpg");
}

.el-carousel__item:nth-child(2n + 1) {
  background-image:url("../../../static/img/pic2.jpg") ;
  width: 1200px;
}

</style>
